getfirst (generic function with 1 method)
👀 Reading hidden code
👀 Reading hidden code
import Pkg
"stream is closed or unusable"
0
👀 Reading hidden code
"SpecialFunctions"
👀 Reading hidden code
packages_i_want = ["SpecialFunctions"]# , "DataArrays"]
SystemError: opening file "/tmp/jl_uMq3cv/Project.toml": No such file or directory
Here is what happened, the most recent locations are first:
- systemerror
(p::String, errno::Int32; extrainfo::Nothing) from error.jl:174 - #systemerror#68from error.jl:173
- systemerrorfrom error.jl:173
- open
(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Nothing, append::Nothing) from iostream.jl:293 - openfrom iostream.jl:282
- open
(f::Base.var"#364#365"{String}, args::String; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) from io.jl:328 - openfrom io.jl:328
- read
(filename::String, #unused#::Type{String}) from io.jl:436 - from This cell: line 4
Text(read(ctx.env.project_file, String))
end
let
try result catch end
Text(read(ctx.env.project_file, String))
end
👀 Reading hidden code
UndefVarError: result not defined
Here is what happened, the most recent locations are first:
let
result
sort([e.name => e.version for e in values(ctx.env.manifest)]; by=first)
end
👀 Reading hidden code
SystemError: opening file "/tmp/jl_uMq3cv/Manifest.toml": No such file or directory
Here is what happened, the most recent locations are first:
- systemerror
(p::String, errno::Int32; extrainfo::Nothing) from error.jl:174 - #systemerror#68from error.jl:173
- systemerrorfrom error.jl:173
- open
(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Nothing, append::Nothing) from iostream.jl:293 - openfrom iostream.jl:282
- open
(f::Base.var"#364#365"{String}, args::String; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) from io.jl:328 - openfrom io.jl:328
- read
(filename::String, #unused#::Type{String}) from io.jl:436 - from This cell: line 4
Text(read(ctx.env.manifest_file, String))
end
Keep calm, you got this!
let
try result catch end
Text(read(ctx.env.manifest_file, String))
end
👀 Reading hidden code
true
Pkg.PRESERVE_ALL < Pkg.PRESERVE_NONE
👀 Reading hidden code
PRESERVE_DIRECT::PreserveLevel = 1
Pkg.PreserveLevel(Int64(Pkg.PRESERVE_ALL) + 1)
👀 Reading hidden code
PRESERVE_ALL::PreserveLevel = 0
PRESERVE_DIRECT::PreserveLevel = 1
PRESERVE_SEMVER::PreserveLevel = 2
PRESERVE_NONE::PreserveLevel = 4
tiers = [
Pkg.PRESERVE_ALL,
Pkg.PRESERVE_DIRECT,
Pkg.PRESERVE_SEMVER,
Pkg.PRESERVE_NONE,
]
👀 Reading hidden code
PRESERVE_NONE::PreserveLevel = 4
5
i = iterate(tiers, 4)
👀 Reading hidden code
👀 Reading hidden code
update_nbpkg (generic function with 1 method)
function update_nbpkg(ctx, new_packages)
if ctx !== nothing
new_packages = String.(new_packages)
removed = setdiff(keys(ctx.env.project.deps), new_packages)
added = setdiff(new_packages, keys(ctx.env.project.deps))
to_remove = filter(removed) do p
haskey(ctx.env.project.deps, p)
end
if !isempty(to_remove)
Pkg.rm(ctx, [
Pkg.PackageSpec(name=p)
for p in to_remove
])
end
local used_tier = Pkg.PRESERVE_ALL
to_add = added
if !isempty(to_add)
for tier in [
Pkg.PRESERVE_ALL,
Pkg.PRESERVE_DIRECT,
Pkg.PRESERVE_SEMVER,
Pkg.PRESERVE_NONE,
]
used_tier = tier
try
Pkg.add(ctx, [
Pkg.PackageSpec(name=p)
for p in to_add
]; preserve=used_tier)
break
catch e
if used_tier == Pkg.PRESERVE_NONE
# give up
rethrow(e)
end
end
end
# for p in to_add
# entry = first(e -> e.name == p, values(ctx.env.manifest))
# if entry.version !== nothing
# ctx.env.project.compat[p] = "^" * string(entry.version)
# end
# end
# Pkg.Types.write_env(ctx.env)
end
end
(used_tier=used_tier,
# changed_versions=Dict{String,Pair}(),
restart_recommended=(!isempty(to_remove) || used_tier != Pkg.PRESERVE_ALL),
restart_required=(used_tier ∈ [Pkg.PRESERVE_SEMVER, Pkg.PRESERVE_NONE]),)
end
👀 Reading hidden code
Not found
Here is what happened, the most recent locations are first:
- error
(s::String) from error.jl:33 - getfirst
(f::Main.workspace#2.var"#7#8"{String}, xs::Base.ValueIterator{Dict{Base.UUID, Pkg.Types.PackageEntry}}) from Other cell: line 7end
end
error("Not found")
end
- Show more...
Maybe time for a break? ☕️
entry = get_manifest_entry(ctx, first(packages_i_want))
👀 Reading hidden code
get_manifest_entry (generic function with 1 method)
get_manifest_entry(ctx::Pkg.Types.Context, pkg_name::String) =
getfirst(e -> e.name == pkg_name, values(ctx.env.manifest))
👀 Reading hidden code
"/tmp/jl_uMq3cv/Project.toml"
"/tmp/jl_uMq3cv/Project.toml"
"/tmp/jl_uMq3cv/Manifest.toml"
nothing
nothing
nothing
nothing
nothing
nothing
v"2.0.0"
nothing
nothing
nothing
nothing
nothing
v"2.0.0"
let
try result catch end
ctx.env
end
👀 Reading hidden code
"/tmp/jl_uMq3cv/Project.toml"
"/tmp/jl_uMq3cv/Project.toml"
"/tmp/jl_uMq3cv/Manifest.toml"
nothing
nothing
nothing
nothing
nothing
nothing
v"2.0.0"
nothing
nothing
nothing
nothing
nothing
v"2.0.0"
IOContext(Base.PipeEndpoint(RawFD(4294967295) closed, 0 bytes waiting))
false
false
8
Registry: "General" at "/home/runner/.julia/registries/General.toml": uuid: 23338594-aafe-5451-b93e-139f81909106 repo: https://github.com/JuliaRegistries/General.git git-tree-sha1: 864f4b2bd5fa6527e2c86b9e59a465376aeafcab packages: 11989
v"1.7.3"
ctx = Pkg.Types.Context(env=Pkg.Types.EnvCache(joinpath(mktempdir(),"Project.toml")))
👀 Reading hidden code
"/tmp/jl_uMq3cv"
ctx.env.project_file |> dirname
👀 Reading hidden code
"/tmp/jl_nvjQo8"
pt = tempname()
👀 Reading hidden code
Versions
👀 Reading hidden code
installed = keys(ctx.env.project.deps)
👀 Reading hidden code
👀 Reading hidden code
get_installed_version (generic function with 1 method)
function get_installed_version(ctx, pkg_name)
if pkg_name ∈ stdlibs
"stdlib"
else
entry = get_manifest_entry(ctx, pkg_name)
entry.version
end
end
👀 Reading hidden code
Dict(x => get_installed_version(ctx, x) for x in installed)
👀 Reading hidden code
Not found
Here is what happened, the most recent locations are first:
- error
(s::String) from error.jl:33 - getfirst
(f::Main.workspace#2.var"#7#8"{String}, xs::Base.ValueIterator{Dict{Base.UUID, Pkg.Types.PackageEntry}}) from Other cell: line 7end
end
error("Not found")
end
- Show more...
Silly computer!
get_installed_version(ctx, "SpecialFunctions")
👀 Reading hidden code
Stdlibs
👀 Reading hidden code
"ArgTools"
"Artifacts"
"Base64"
"CRC32c"
"CompilerSupportLibraries_jll"
"Dates"
"DelimitedFiles"
"Distributed"
"Downloads"
"FileWatching"
"Future"
"GMP_jll"
"InteractiveUtils"
"LLVMLibUnwind_jll"
"LazyArtifacts"
"LibCURL"
"LibCURL_jll"
"LibGit2"
"LibGit2_jll"
"LibSSH2_jll"
"Tar"
"Test"
"UUIDs"
"Unicode"
"Zlib_jll"
"dSFMT_jll"
"libLLVM_jll"
"libblastrampoline_jll"
"nghttp2_jll"
"p7zip_jll"
👀 Reading hidden code
👀 Reading hidden code